// const iconAry = ['approve', 'sign', 'official-document', 'reimbursement', 'my-request']
// const colorAry = ['#e7505a', '#3598dc', '#32c5d2', '#578ebe', '#1bbc9b', '#3280fc', '#145ccd', '#8666b8', '#38b03f', '#03b8cf']

const iconAry = ['approve', 'sign', 'official-document']
const colorAry = ['#e7505a', '#3598dc', '#32c5d2']

export default {
  methods: {
    // _random(ary, i) {
    //   if (i >= 0) {
    //     return ary[parseInt(i % ary.length)]
    //   }
    //   return ary[ Math.floor((Math.random() * ary.length))]
    // },
    // _randomIcon(i) {
    //   return this._random(iconAry, i)
    // },
    // _randomColor(i) {
    //   return this._random(colorAry, i)
    // }
    _randomIcon(text) {
      let icon = '';
      switch(text) {
        case '协和发文':
          icon = iconAry[0];
          break; 
        case '协和收文':
          icon = iconAry[1];
          break;
        default:
          icon = iconAry[2];
      }
      return icon;
    },
    _randomColor(text) {
      let color = '';
      switch(text) {
        case '协和发文':
          color = colorAry[0];
          break; 
        case '协和收文':
          color = colorAry[1];
          break;
        default:
          color = colorAry[2];
      }
      return color;
    }
  }
}
